package com.huaxin.common.Entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/11/25.
 * {"
 * ":"未来之光","backDate":1479971441000,"backDes":"系统管理员11月签退",
 * "backImgUrl":["1.jpg","2.jpg"],"id":6,"inAddress":"未来之光","inDate":1479971441000,
 * "inDes":"系统管理员11月签到","inImgUrl":["1.jpg","2.jpg"],"stationName":"测试站点4"}
 */

public class SignInfoDTO extends BaseDTO implements Parcelable {

    /**
     * signId : 3
     * stationCode : PWFH4Y
     * signTypes : [{"id":1,"des":"清洁站区"},{"id":2,"des":"常规检查"},{"id":3,"des":"设备维修"},{"id":4,"des":"设备检查"}]
     * signState : 2
     * backImgUrls : [{"id":23,"backImgUrl":"http://139.224.234.222:8082/uploads/signinImg/PWFH4Y/170805101405_18_PictureSelector_20170803_104902.JPEG"},{"id":24,"backImgUrl":"http://139.224.234.222:8082/uploads/signinImg/PWFH4Y/170805101405_82_IMG_20170803_101531.jpg"},{"id":25,"backImgUrl":"http://139.224.234.222:8082/uploads/signinImg/PWFH4Y/170805101453_86_IMG_20170803_101531.jpg"},{"id":26,"backImgUrl":"http://139.224.234.222:8082/uploads/signinImg/PWFH4Y/170805101453_40_PictureSelector_20170803_104902.JPEG"}]
     * inDate : 1501899107000
     * inAddress : 湖北省武汉市洪山区光谷大道
     * stationLng : 114.43123
     * stationLat : 30.509644
     * inLng : 114.431242
     * inDes : 2222
     * backTypeIds : [{"id":"1","des":"清洁站区"},{"id":"2","des":"常规检查"}]
     * address : 湖北省武汉市洪山区光谷大道
     * inLat : 30.509247
     * backAddress : 湖北省武汉市洪山区光谷大道
     * backLng : 114.431242
     * backLat : 30.509247
     * stationName : 华北设计院静海县大邱庄
     * backDes : 333
     * backDate : 1501899121000
     * inImgUrls : [{"id":21,"inImgUrl":"http://139.224.234.222:8082/uploads/signinImg/PWFH4Y/170805101209_10_IMG_20170803_082456.jpg"},{"id":22,"inImgUrl":"http://139.224.234.222:8082/uploads/signinImg/PWFH4Y/170805101209_01_IMG_20170803_101531.jpg"}]
     * inTypeIds : [{"id":"1","des":"清洁站区"},{"id":"2","des":"常规检查"},{"id":"3","des":"设备维修"}]
     */

    private int signId;
    private String                stationCode;
    private int                   signState;
    private long                  inDate;
    private String                inAddress;
    private double                stationLng;
    private double                stationLat;
    private double                inLng;
    private String                inDes;
    private String                address;
    private double                inLat;
    private String                backAddress;
    private double                backLng;
    private double                backLat;
    private String                stationName;
    private String                backDes;
    private long                  backDate;
    private List<SignTypesBean>   signTypes;
    private List<BackImgUrlsBean> backImgUrls;
    private List<BackTypeIdsBean> backTypeIds;
    private List<InImgUrlsBean>   inImgUrls;
    private List<InTypeIdsBean>   inTypeIds;

    public int getSignId() {
        return signId;
    }

    public void setSignId(int signId) {
        this.signId = signId;
    }

    public String getStationCode() {
        return stationCode;
    }

    public void setStationCode(String stationCode) {
        this.stationCode = stationCode;
    }

    public int getSignState() {
        return signState;
    }

    public void setSignState(int signState) {
        this.signState = signState;
    }

    public long getInDate() {
        return inDate;
    }

    public void setInDate(long inDate) {
        this.inDate = inDate;
    }

    public String getInAddress() {
        return inAddress;
    }

    public void setInAddress(String inAddress) {
        this.inAddress = inAddress;
    }

    public double getStationLng() {
        return stationLng;
    }

    public void setStationLng(double stationLng) {
        this.stationLng = stationLng;
    }

    public double getStationLat() {
        return stationLat;
    }

    public void setStationLat(double stationLat) {
        this.stationLat = stationLat;
    }

    public double getInLng() {
        return inLng;
    }

    public void setInLng(double inLng) {
        this.inLng = inLng;
    }

    public String getInDes() {
        return inDes;
    }

    public void setInDes(String inDes) {
        this.inDes = inDes;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public double getInLat() {
        return inLat;
    }

    public void setInLat(double inLat) {
        this.inLat = inLat;
    }

    public String getBackAddress() {
        return backAddress;
    }

    public void setBackAddress(String backAddress) {
        this.backAddress = backAddress;
    }

    public double getBackLng() {
        return backLng;
    }

    public void setBackLng(double backLng) {
        this.backLng = backLng;
    }

    public double getBackLat() {
        return backLat;
    }

    public void setBackLat(double backLat) {
        this.backLat = backLat;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getBackDes() {
        return backDes;
    }

    public void setBackDes(String backDes) {
        this.backDes = backDes;
    }

    public long getBackDate() {
        return backDate;
    }

    public void setBackDate(long backDate) {
        this.backDate = backDate;
    }

    public List<SignTypesBean> getSignTypes() {
        return signTypes;
    }

    public void setSignTypes(List<SignTypesBean> signTypes) {
        this.signTypes = signTypes;
    }

    public List<BackImgUrlsBean> getBackImgUrls() {
        return backImgUrls;
    }

    public void setBackImgUrls(List<BackImgUrlsBean> backImgUrls) {
        this.backImgUrls = backImgUrls;
    }

    public List<BackTypeIdsBean> getBackTypeIds() {
        return backTypeIds;
    }

    public void setBackTypeIds(List<BackTypeIdsBean> backTypeIds) {
        this.backTypeIds = backTypeIds;
    }

    public List<InImgUrlsBean> getInImgUrls() {
        return inImgUrls;
    }

    public void setInImgUrls(List<InImgUrlsBean> inImgUrls) {
        this.inImgUrls = inImgUrls;
    }

    public List<InTypeIdsBean> getInTypeIds() {
        return inTypeIds;
    }

    public void setInTypeIds(List<InTypeIdsBean> inTypeIds) {
        this.inTypeIds = inTypeIds;
    }

    public static class SignTypesBean implements Parcelable {
        /**
         * id : 1
         * des : 清洁站区
         */
        private boolean isCheck;
        private int id;
        private String des;

        public boolean isCheck() {
            return isCheck;
        }

        public void setCheck(boolean check) {
            isCheck = check;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getDes() {
            return des;
        }

        public void setDes(String des) {
            this.des = des;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeByte(this.isCheck ? (byte) 1 : (byte) 0);
            dest.writeInt(this.id);
            dest.writeString(this.des);
        }

        public SignTypesBean() {
        }

        protected SignTypesBean(Parcel in) {
            this.isCheck = in.readByte() != 0;
            this.id = in.readInt();
            this.des = in.readString();
        }

        public static final Creator<SignTypesBean> CREATOR = new Creator<SignTypesBean>() {
            @Override
            public SignTypesBean createFromParcel(Parcel source) {
                return new SignTypesBean(source);
            }

            @Override
            public SignTypesBean[] newArray(int size) {
                return new SignTypesBean[size];
            }
        };
    }

    public static class BackImgUrlsBean implements Parcelable {
        /**
         * id : 23
         * backImgUrl : http://139.224.234.222:8082/uploads/signinImg/PWFH4Y/170805101405_18_PictureSelector_20170803_104902.JPEG
         */

        private int id;
        private String backImgUrl;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getBackImgUrl() {
            return backImgUrl;
        }

        public void setBackImgUrl(String backImgUrl) {
            this.backImgUrl = backImgUrl;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.id);
            dest.writeString(this.backImgUrl);
        }

        public BackImgUrlsBean() {
        }

        protected BackImgUrlsBean(Parcel in) {
            this.id = in.readInt();
            this.backImgUrl = in.readString();
        }

        public static final Creator<BackImgUrlsBean> CREATOR = new Creator<BackImgUrlsBean>() {
            @Override
            public BackImgUrlsBean createFromParcel(Parcel source) {
                return new BackImgUrlsBean(source);
            }

            @Override
            public BackImgUrlsBean[] newArray(int size) {
                return new BackImgUrlsBean[size];
            }
        };
    }

    public static class BackTypeIdsBean implements Parcelable {
        /**
         * id : 1
         * des : 清洁站区
         */

        private String id;
        private String des;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getDes() {
            return des;
        }

        public void setDes(String des) {
            this.des = des;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.des);
        }

        public BackTypeIdsBean() {
        }

        protected BackTypeIdsBean(Parcel in) {
            this.id = in.readString();
            this.des = in.readString();
        }

        public static final Creator<BackTypeIdsBean> CREATOR = new Creator<BackTypeIdsBean>() {
            @Override
            public BackTypeIdsBean createFromParcel(Parcel source) {
                return new BackTypeIdsBean(source);
            }

            @Override
            public BackTypeIdsBean[] newArray(int size) {
                return new BackTypeIdsBean[size];
            }
        };
    }

    public static class InImgUrlsBean implements Parcelable {
        /**
         * id : 21
         * inImgUrl : http://139.224.234.222:8082/uploads/signinImg/PWFH4Y/170805101209_10_IMG_20170803_082456.jpg
         */

        private int id;
        private String inImgUrl;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getInImgUrl() {
            return inImgUrl;
        }

        public void setInImgUrl(String inImgUrl) {
            this.inImgUrl = inImgUrl;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.id);
            dest.writeString(this.inImgUrl);
        }

        public InImgUrlsBean() {
        }

        protected InImgUrlsBean(Parcel in) {
            this.id = in.readInt();
            this.inImgUrl = in.readString();
        }

        public static final Creator<InImgUrlsBean> CREATOR = new Creator<InImgUrlsBean>() {
            @Override
            public InImgUrlsBean createFromParcel(Parcel source) {
                return new InImgUrlsBean(source);
            }

            @Override
            public InImgUrlsBean[] newArray(int size) {
                return new InImgUrlsBean[size];
            }
        };
    }

    public static class InTypeIdsBean implements Parcelable {
        /**
         * id : 1
         * des : 清洁站区
         */

        private String id;
        private String des;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getDes() {
            return des;
        }

        public void setDes(String des) {
            this.des = des;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.des);
        }

        public InTypeIdsBean() {
        }

        protected InTypeIdsBean(Parcel in) {
            this.id = in.readString();
            this.des = in.readString();
        }

        public static final Creator<InTypeIdsBean> CREATOR = new Creator<InTypeIdsBean>() {
            @Override
            public InTypeIdsBean createFromParcel(Parcel source) {
                return new InTypeIdsBean(source);
            }

            @Override
            public InTypeIdsBean[] newArray(int size) {
                return new InTypeIdsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.signId);
        dest.writeString(this.stationCode);
        dest.writeInt(this.signState);
        dest.writeLong(this.inDate);
        dest.writeString(this.inAddress);
        dest.writeDouble(this.stationLng);
        dest.writeDouble(this.stationLat);
        dest.writeDouble(this.inLng);
        dest.writeString(this.inDes);
        dest.writeString(this.address);
        dest.writeDouble(this.inLat);
        dest.writeString(this.backAddress);
        dest.writeDouble(this.backLng);
        dest.writeDouble(this.backLat);
        dest.writeString(this.stationName);
        dest.writeString(this.backDes);
        dest.writeLong(this.backDate);
        dest.writeList(this.signTypes);
        dest.writeList(this.backImgUrls);
        dest.writeList(this.backTypeIds);
        dest.writeList(this.inImgUrls);
        dest.writeList(this.inTypeIds);
    }

    public SignInfoDTO() {
    }

    protected SignInfoDTO(Parcel in) {
        this.signId = in.readInt();
        this.stationCode = in.readString();
        this.signState = in.readInt();
        this.inDate = in.readLong();
        this.inAddress = in.readString();
        this.stationLng = in.readDouble();
        this.stationLat = in.readDouble();
        this.inLng = in.readDouble();
        this.inDes = in.readString();
        this.address = in.readString();
        this.inLat = in.readDouble();
        this.backAddress = in.readString();
        this.backLng = in.readDouble();
        this.backLat = in.readDouble();
        this.stationName = in.readString();
        this.backDes = in.readString();
        this.backDate = in.readLong();
        this.signTypes = new ArrayList<SignTypesBean>();
        in.readList(this.signTypes, SignTypesBean.class.getClassLoader());
        this.backImgUrls = new ArrayList<BackImgUrlsBean>();
        in.readList(this.backImgUrls, BackImgUrlsBean.class.getClassLoader());
        this.backTypeIds = new ArrayList<BackTypeIdsBean>();
        in.readList(this.backTypeIds, BackTypeIdsBean.class.getClassLoader());
        this.inImgUrls = new ArrayList<InImgUrlsBean>();
        in.readList(this.inImgUrls, InImgUrlsBean.class.getClassLoader());
        this.inTypeIds = new ArrayList<InTypeIdsBean>();
        in.readList(this.inTypeIds, InTypeIdsBean.class.getClassLoader());
    }

    public static final Creator<SignInfoDTO> CREATOR = new Creator<SignInfoDTO>() {
        @Override
        public SignInfoDTO createFromParcel(Parcel source) {
            return new SignInfoDTO(source);
        }

        @Override
        public SignInfoDTO[] newArray(int size) {
            return new SignInfoDTO[size];
        }
    };
}
